package com.thoughtworks;

public class FizzBuzz {

    public String getValue(int number) {
        String value = "";

        if (number % 3 == 0) {
            value += "Fizz";
        }
        if (number % 5 == 0) {
            value += "Buzz";
        }
        if (value.length() == 0) {
            value = Integer.toString(number);
        }

        return value;
    }

    public static void main(String[] args) {
        FizzBuzz fizzBuzz = new FizzBuzz();

        for (int i = 1; i <= 100; i++) {
            System.out.println(fizzBuzz.getValue(i));
        }
    }
}
